package com.freshminds.saudiproject;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.Toast;

public class AboutDoctor extends Activity implements OnClickListener
{
	ImageView imgVwEmail,imgVwContact,imgVwBack; 
 @Override
protected void onCreate(Bundle savedInstanceState) 
 {
	// TODO Auto-generated method stub
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_about_doctor);
	imgVwBack=(ImageView)findViewById(R.id.ximgVwBack);
	imgVwEmail=(ImageView)findViewById(R.id.ximgVwEmail);
	imgVwContact=(ImageView)findViewById(R.id.ximgVwContact);
	imgVwEmail.setOnClickListener(this);
	imgVwContact.setOnClickListener(this);
	imgVwBack.setOnClickListener(this);
	findBottomMenuView();
}
 
 
 void findBottomMenuView()
	{
		ImageView imgVwFeatured,imgVwMostViewed,imgVwMyFavourites,imgVwSendToFriend;
		
		imgVwFeatured=(ImageView)findViewById(R.id.ximgVwFeatured);
		imgVwMostViewed=(ImageView)findViewById(R.id.ximgVwMostViewed);
		imgVwMyFavourites=(ImageView)findViewById(R.id.ximgVwMyFavourites);
		imgVwSendToFriend=(ImageView)findViewById(R.id.ximgVwSendToFriend);
		
		imgVwFeatured.setOnClickListener(new OnClickListener() 
		{
			
			@Override
			public void onClick(View v) 
			{
				Utility utility=new Utility(AboutDoctor.this);
				utility.showToast("Button Clicked");
				
			}
		});
		
		imgVwMostViewed.setOnClickListener(new OnClickListener() 
		{
			
			@Override
			public void onClick(View v) 
			{
				startActivity(new Intent(AboutDoctor.this, MostViewed.class));
				
			}
		});
		
		imgVwMyFavourites.setOnClickListener(new OnClickListener() 
		{
			
			@Override
			public void onClick(View v) 
			{
				Utility utility=new Utility(AboutDoctor.this);
				utility.showToast("Button Clicked");
				
			}
		});

		imgVwSendToFriend.setOnClickListener(new OnClickListener()
		{
	
			@Override
			public void onClick(View v) 
			{
				Utility utility=new Utility(AboutDoctor.this);
				utility.showToast("Button Clicked");
				
			}
		});
		
		
		
		
	}
 
 
@Override
public void onClick(View v) 
{
	if(v==imgVwEmail)	
	{
		Utility utility=new Utility(AboutDoctor.this);
		utility.SendEmail();
	}
	else if(v==imgVwContact)
	{
		
		try 
		{
			Intent dialIntent=new Intent(Intent.ACTION_DIAL, Uri.parse(Constants.Contact_Number));
			startActivity(dialIntent);
		} catch (android.content.ActivityNotFoundException ex) 
		{
		    Toast.makeText(AboutDoctor.this, "There are no email clients installed.", Toast.LENGTH_SHORT).show();
		}
		
	}
	else if(v==imgVwBack)
	{
		finish();
	}
}
 
 
 
 
 
 
 
 
 
}
